package com.moba.service;

import com.moba.domain.UserRelation;
import com.moba.mapper.UserRelationMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author liu, jia
 * @version 2019-09-30 17:14
 * @date 2019-09-30 17:14
 */
@Service
@Transactional
public class UserRelationService {

  @Resource private UserRelationMapper userRelationMapper;

  public UserRelation getEntity(UserRelation t) {
    return this.userRelationMapper.selectEntity(t);
  }

  public Integer getEntityCount(UserRelation t) {
    return this.userRelationMapper.selectEntityCount(t);
  }

  public List<UserRelation> getEntityList(UserRelation t) {
    return this.userRelationMapper.selectEntityList(t);
  }

  public Integer createEntity(UserRelation t) {
    this.userRelationMapper.insertEntity(t);
    return t.getId();
  }

  public int updateEntity(UserRelation t) {
    return this.userRelationMapper.updateEntity(t);
  }

  public int removeEntity(UserRelation t) {
    return this.userRelationMapper.deleteEntity(t);
  }

  public List<UserRelation> getEntityPaginatedList(UserRelation t) {
    return this.userRelationMapper.selectEntityPaginatedList(t);
  }

  public List<UserRelation> getUserSonSumMoney(UserRelation t) {
    return this.userRelationMapper.selectUserSonSumMoney(t);
  }

  public BigDecimal getUserSonSumMoneyLeiji(UserRelation t) {
    return this.userRelationMapper.selectUserSonSumMoneyLeiji(t);
  }
}
